package client

import (
	. "starsine.cn/appTpl/cmn/defs"
	"starsine.cn/appTpl/cmn/logs"
)

var svcClientMng *SvcClientMng = nil

func Start(appCtxt *AppContext) {
	svcClientMng = CreateSvcClientMng(appCtxt)
	svcClientMng.Start()

	logs.Infof("svcpeers start")
}

func GetSvcClient(instanceID, addr string) *GRpcClient {
	return svcClientMng.Get(instanceID, addr)
}

func PushSvcClient(instanceID string) {
	svcClientMng.Push(instanceID)
}

func Dump() string {
	return svcClientMng.Dump()
}
